#ifndef ILAYER_PRIVATE_H
#define ILAYER_PRIVATE_H
#include <osgEarth/VisibleLayer.h>
#include "SDKCorePrivate.h"
#include "LayerManager.h"

class ILayerPrivate : public ILayer
{
public:
	ILayerPrivate();
	virtual ~ILayerPrivate();
	virtual osgEarth::Layer* getOsgLayer() { return osgLayer.get(); }
public:
	void destroy()
	{
		GLOBAL_OSG_MAP_NODE->getMap()->removeLayer(osgLayer.get());
	}

	void setVisible(bool visible) { osgLayer->setVisible(visible); }
	bool isVisible()const { return osgLayer->getVisible(); }
private:
	osg::ref_ptr<osgEarth::VisibleLayer> osgLayer;
};

#endif
